<?php

/**
 * NOTICE OF LICENSE
 *
 * THIS SOURCE FILE IS PART OF EVEBIT'S PRIVATE PROJECT.
 * 
 * DO NOT USE THIS FILE IN OTHER PLACE.
 *
 * @package   App_Sample
 * @author    Cheng Wei <berlios.o@gmail.com>
 * @version   $$Id: GetSortClass.php 130 2011-03-18 03:10:02Z cheng.wei $$
 * @copyright Copyright (c) 2008 Evebit Inc. China (http://www.evebit.com)
 */

/**
 * Get Revage rate and get rate count
 * 
 * @package   App_Sample
 * @author    Chang ZhenHua <chang.zhenhua@gmail.com>
 * @version   $$Id: GetSortClass.php 130 2011-03-18 03:10:02Z cheng.wei $$
 */
class Evebit_View_Helper_GetScrollSliderImage extends Zend_View_Helper_Abstract {
	protected $firstload = false;	
	
    function getScrollSliderImage($gallaryitems,$getImageMethodName='getAUrl',$w=830) {
    	//load script
    	if (!$this->firstload) {
    		//load script and css start
    		$this->view->headLink()->prependStylesheet($this->view->baseUrl("media/css/scrollslide.css"));
    		$this->view->headScript()->prependFile($this->view->baseUrl("media/js/scrollslider.js"));
    		//load script and css end
    		$this->firstload = true;
    	}
		
    	$style="margin-left:25px;width:".$w."px;";
		$html = '<div id="sliderfooter" >
              <p style="padding-left:25px">
              <div class="blk_18" style="'.$style.'"> 
                <!--<a class="LeftBotton" onmousedown="ISL_GoUp_1()" onmouseup="ISL_StopUp_1()" onmouseout="ISL_StopUp_1()" href="javascript:void(0);" target="_self"></a>-->
                <div class="pcont" id="ISL_Cont_1" style="margin-top:12px">
	            <div class="ScrCont">
	            <div id="List1_1">';
		foreach($gallaryitems as $item) {
			$html .= '<a><img src="'.$this->view->baseUrl("/media/".$item->$getImageMethodName()).'" alt="" height="100px"/></a>&nbsp;';
		}
		$html .= '</div>
	              <div id="List2_1"></div>
	         </div>
           </div>
          <!--<a class="RightBotton" onmousedown="ISL_GoRight_1()" onmouseup="ISL_StopRight_1()" onmouseout="ISL_StopRight_1()" href="javascript:void(0);" target="_self"></a>-->
       </div>
      <div class="c"></div>
      </p>
      </div>
      <script type="text/javascript">
        picrun_ini();
      </script>';
      return $html;
	}
	
}